import { createPinia } from 'pinia'
const store = createPinia()

import useUserStore from './modules/user';
import useMenuStore from './modules/menu';
export { useUserStore, useMenuStore };

export const registerStore = () => {
    store.userStore = useUserStore()
    store.menuStore = useMenuStore()
}

/** 持久化*/
import piniaPluginPersist from 'pinia-plugin-persist'
store.use(piniaPluginPersist)

export default store
